﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace Contract
{
    
    [Serializable]
    [MessageContract]
   public class MyFile
    {
        public MyFile()
        {
            Filename = "";
            Value = null;
            Size = 0;
            FileOwnerPCN = "";
            FileUploadTime = "";
            FileID = "";
        }

        public MyFile(string name,long size,Stream value, string fileuploadtime, string fileid, string fileownerPCN )
        {

            Filename = name;
            Value = value; 
            Size = size;
            FileUploadTime = fileuploadtime;
            FileID =fileid;
            FileOwnerPCN =fileownerPCN;
           
        }

        [MessageHeader(MustUnderstand = true)]
        public string Filename { get; set; }
        [MessageBodyMember(Order = 1)]
        public Stream Value { get; set; }
        [MessageHeader(MustUnderstand = true)]
        public long Size { get; set; }
        [MessageHeader(MustUnderstand=true)]
        public string FileUploadTime { get; set; }
        [MessageHeader(MustUnderstand = true)]
        public string FileID { get; set; }
        [MessageHeader(MustUnderstand = true)]
        public string FileOwnerPCN { get; set; }
    }

    
}
